﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Marbles.Core.Authentication;
using System.Data;

namespace Marbles.Core.Authentication.Generic
{
    /// <summary>
    /// IdentityToken for Generic database provider
    /// </summary>
    public class IdentityToken : TokenBase, IToken
    {
        public IdentityToken()
            : base()
        {
        }

        public IdentityToken(DataTable dt)
            : base()
        {
            _success = true;
            _identity = dt.Rows[0]["username"].ToString();

            this.LoadPermissions(_identity);
        }
    }
}